[PATCH] postgresql.conf.sample comment alignment.

  • Jump to comment-1
    smithpb2250@gmail.com2022-08-01T23:24:02+00:00
    This patch tweaks a some tabbing and replaces some spaces with tabs to improve slightly the comment alignment in file 'postgresql.conf.sample' PSA. ------ Kind Regards, Peter Smith. Fujitsu Australia
    • Jump to comment-1
      tgl@sss.pgh.pa.us2022-08-02T00:03:24+00:00
      Peter Smith <smithpb2250@gmail.com> writes: > This patch tweaks a some tabbing and replaces some spaces with tabs to > improve slightly the comment alignment in file > 'postgresql.conf.sample' Hmm ... the parts you want to change generally look OK to me. I wonder if you are looking at it with tab stops set to 4 spaces rather than 8 spaces? While 4 spaces is our convention for C code, postgresql.conf is going to be edited by end users who almost certainly have their editors set up for 8 spaces, so it's going to look funny to them if the comments are aligned on the assumption of 4 spaces. One idea for avoiding confusion is to legislate that we won't use tabs at all in this file (which we could enforce via .gitattributes, I think). But that might just be making things equally inconvenient for everybody. regards, tom lane
      • Jump to comment-1
        alvherre@alvh.no-ip.org2022-08-03T10:58:04+00:00
        On 2022-Aug-01, Tom Lane wrote: > One idea for avoiding confusion is to legislate that we won't > use tabs at all in this file (which we could enforce via > .gitattributes, I think). +1. > But that might just be making things equally inconvenient for > everybody. In this situation, the only disadvantaged users are those using a non-fixed-width font in their editor, but those are lost souls already. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Having your biases confirmed independently is how scientific progress is made, and hence made our great society what it is today" (Mary Gardiner)
        • Jump to comment-1
          michael@paquier.xyz2022-08-04T01:09:27+00:00
          On Wed, Aug 03, 2022 at 12:58:04PM +0200, Alvaro Herrera wrote: > On 2022-Aug-01, Tom Lane wrote: >> One idea for avoiding confusion is to legislate that we won't >> use tabs at all in this file (which we could enforce via >> .gitattributes, I think). > > +1. That's not the first time this 4- or 8-character tab issue is popping up around here, so enforcing spaces and having a rule sounds like a good idea at the end. >> But that might just be making things equally inconvenient for >> everybody. > > In this situation, the only disadvantaged users are those using a > non-fixed-width font in their editor, but those are lost souls already. Haha. -- Michael
          • Jump to comment-1
            smithpb2250@gmail.com2022-08-04T02:42:38+00:00
            On Thu, Aug 4, 2022 at 11:09 AM Michael Paquier <michael@paquier.xyz> wrote: > > On Wed, Aug 03, 2022 at 12:58:04PM +0200, Alvaro Herrera wrote: > > On 2022-Aug-01, Tom Lane wrote: > >> One idea for avoiding confusion is to legislate that we won't > >> use tabs at all in this file (which we could enforce via > >> .gitattributes, I think). > > > > +1. > > That's not the first time this 4- or 8-character tab issue is popping > up around here, so enforcing spaces and having a rule sounds like a > good idea at the end. > Well, it was only assumed that I had probably confused 4- 8- tabs, but I don't think I did, so the tabbing issue did not really "pop up" here. e.g. you can see some of the existing alignments I'd suggested modifying here [1] - #shared_preload_libraries = '' # (change requires restart) - #idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disable <- (moved comments of the neighbours to keep them all aligned) - etc. I'm not saying replacing the tabs with spaces isn't a good idea - I also agree probably it is, but that's a different problem to the alignments I was trying to correct with the patch ------ [1] https://github.com/postgres/postgres/blob/master/src/backend/utils/misc/postgresql.conf.sample Kind Regards, Peter Smith. Fujitsu Australia
          • Jump to comment-1
            rjuju123@gmail.com2022-08-04T02:19:39+00:00
            On Thu, Aug 04, 2022 at 10:09:27AM +0900, Michael Paquier wrote: > On Wed, Aug 03, 2022 at 12:58:04PM +0200, Alvaro Herrera wrote: > > On 2022-Aug-01, Tom Lane wrote: > >> One idea for avoiding confusion is to legislate that we won't > >> use tabs at all in this file (which we could enforce via > >> .gitattributes, I think). > > > > +1. > > That's not the first time this 4- or 8-character tab issue is popping > up around here, so enforcing spaces and having a rule sounds like a > good idea at the end. +1
      • Jump to comment-1
        smithpb2250@gmail.com2022-08-02T00:28:56+00:00
        On Tue, Aug 2, 2022 at 10:03 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Peter Smith <smithpb2250@gmail.com> writes: > > This patch tweaks a some tabbing and replaces some spaces with tabs to > > improve slightly the comment alignment in file > > 'postgresql.conf.sample' > > Hmm ... the parts you want to change generally look OK to me. > I wonder if you are looking at it with tab stops set to 4 spaces > rather than 8 spaces? > No. I did fall into that 4/8 trap originally, but I definitely used :set tapstop=8 when modifying this file. > While 4 spaces is our convention for C code, postgresql.conf > is going to be edited by end users who almost certainly have their > editors set up for 8 spaces, so it's going to look funny to them > if the comments are aligned on the assumption of 4 spaces. > > One idea for avoiding confusion is to legislate that we won't > use tabs at all in this file (which we could enforce via > .gitattributes, I think). But that might just be making things > equally inconvenient for everybody. > ------ Kind Regards, Peter Smith Fujitsu Australia